﻿using System.ComponentModel;
using Aierp.Utility.Data;
using Chloe.Entity;

namespace Aierp.SystemEntities.System
{
    [TableName("Sys_Roles")]
    [Description("角色管理")]
    public class Sys_Roles
    {
        [Column(IsPrimaryKey = true)]
        [AutoIncrement]
        public int KeyId { get; set; }

        [Description("角色名称")]
        public string RoleName { get; set; }

        [DefaultValue(0)]
        [Description("排序")]
        public int Sortnum { get; set; }
        [Description("描述")]
        public string Remark { get; set; }

        [Description("是否为默认角色")]
        public int IsDefault { get; set; }

        //[DbField(false)]
        //public IEnumerable<Sys_Navigations> Navigations { get; set; }

        //[DbField(false)]
        //public IEnumerable<sys_users> Users { get; set; }

        
        ///// <summary>
        ///// 角色可以访问的部门列表
        ///// </summary>
        //[DbField(false)]
        //public string Departments
        //{
        //    get { return RoleDal.Instance.GetDepIDs(KeyId); }
        //} 
    }
}
